		<HTML>
		<HEAD>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Flash MX 2004 ActionScript2.0 Library: Verlet - Wright Internet Solutions">
		<meta name="keywords" content="calculus,solvers,RK45,MultiStep,Verlet,Flash,MX,2004,ActionScript,ActionScript2.0,AS2.0 Library,AS2,AS2 Library,Wright Internet Solutions,Wright,classes,documentation,methods,functions,interfaces,JavaScript,Java">
		<TITLE>WIS AS2 Library : com.wis.math.calc.solvers.Verlet Documentation</TITLE>

		<STYLE><!--
		HR.small{height:1px; width:100%; background:#E7BFA3; border: 0px;}
		HR.big{height:4px; width:100%; background:#E7BFA3; border: 0px;}
		A:hover{text-decoration: underline}
		A{text-decoration: none; color: #993333}
		code{font-family: monospace; font-size: 12px; color: #666666;}
		.methodAttributesTitle{font-size: 12px; font-weight: bold; color: #7B779C}
		.ToC{font-size: 12px; font-weight: bold; color: #993333}
		.methodTitle{font-size: 14px; font-weight: bold; color: #993333}
		.groupTitle{font-size: 18px; font-weight: bold; color: #993333}
		.sectionTitle{font-size: 22px; font-weight: bold; color: #993333}
		.majorTitle{font-size: 32px; font-weight: bold; color: #993333; padding-bottom:100px;}
		.methodsDiv{margin-left:40px;}
		.footer{font-size: 11px; color: #666666;}
		body{font-family: arial,sans-serif; font-size: 12px;}
		//--></STYLE>

		</HEAD>
		<BODY bgColor='#ffffcc'>
		<P class='majorTitle'>com.wis.math.calc.solvers.Verlet Documentation</P>

        <P><B>Author:</B> <a href='mailto:wisolutions2002@shaw.ca?subject=wisASLibrary  Verlet Class'>Richard Wright</a><BR>
		<B>Last Modified:</B> 01/12/05 01:09:32<HR class='big'>

		<P class='sectionTitle'>Summary</P>
		<P class='ToC'>com.wis.math.calc.solvers.Verlet class:</P>
		<div class='methodsDiv'><a href='#classinfo'>- description</a></div>
<P class='ToC'>com.wis.math.calc.solvers.Verlet Properties:</P><div class='methodsDiv'>
<a href='#$stepSize'>- $stepSize</a><br>
<a href='#$numEqn'>- $numEqn</a><br>
<a href='#$rate'>- $rate</a><br>
<a href='#$priorState'>- $priorState</a><br>
<a href='#$currentState'>- $currentState</a><br>
<a href='#$ode'>- $ode</a><br>
</div><br>
<P class='ToC'>com.wis.math.calc.solvers.Verlet Methods:</P><div class='methodsDiv'>
<a href='# initialize'>-  initialize</a><br>
<a href='# step'>-  step</a><br>
<a href='# setStepSize'>-  setStepSize</a><br>
<a href='# getStepSize'>-  getStepSize</a><br>
<a href='# setTolerance'>-  setTolerance</a><br>
<a href='# getTolerance'>-  getTolerance</a><br>
<a href='# estimatePreviousState'>-  estimatePreviousState</a><br>
</div><br>

		<HR class='big'>
		<P class='sectionTitle'><A name='classinfo'></A>com.wis.math.calc.solvers.Verlet <I>class</I></P>
		<P> <span class='methodTitle'>version:</span> 1.7</P>
		<P class="methodTitle">description:</P>
		<P>Verlet method IODE solver. The Verlet algorithm is a third order
 algorithm that uses the acceleration to estimate the final position.
 Note that the velocity plays no part in the integration of the
 equations.

 <pre> x(n+1) = 2x(n) - x(n-1) + a(n)dtdt
 v(n+1) = (x(n+1) - x(n-1))/(2 dt) + a(n)dt</pre>

 CAUTION! You MUST call the initialize if the state array is changed.
 The Verlet algorithm is not self-starting.  The current state and a
 prior state must both be known to advance the solution.  Since the
 prior state is not known for the initial conditions, a prior state
 is estimated when the initialize method is invoked.
 <p>
 CAUTION! This implementation assumes that the state vector has
 2N + 1 variables. These variables alternate between position and
 velocity with the last variable being time. That is, the state
 vector is ordered as follows:

 <pre> x1, d x1/dt, x2, d x2/dt, x3, d x3/dt ..... xN, d xN/dt, t</pre>
 </P>
		<P class="methodTitle">usage:</P> <pre>var inst:Verlet = new Verlet(_ode);</pre>

<P> <span class='methodTitle'>parameters:</span>
				<ul>
<li>      _ode  (IODE)  -- the system of differential equations.</li>
</ul>

			<HR class='small'>
			<P class='groupTitle'><A name='properties'></A>com.wis.math.calc.solvers.Verlet Properties:</P>
			<div class='methodsDiv' >


				<P class='methodTitle'><A name='$stepSize'></A><u> $stepSize</u></P>
				<P> (Number)  -- parameter increment such as delta time.</P>

				<P class='methodTitle'><A name='$numEqn'></A><u> $numEqn</u></P>
				<P> (Number)  -- number of equations.</P>

				<P class='methodTitle'><A name='$rate'></A><u> $rate</u></P>
				<P> (Array)  -- rate with original positions.</P>

				<P class='methodTitle'><A name='$priorState'></A><u> $priorState</u></P>
				<P> (Array)  -- rate with new positions.</P>

				<P class='methodTitle'><A name='$currentState'></A><u> $currentState</u></P>
				<P> (Array)  -- current state.</P>

				<P class='methodTitle'><A name='$ode'></A><u> $ode</u></P>
				<P> (IODE)  -- object that computes rate.</P>
</div>

			<HR class='small'>
			<P class='groupTitle'><A name='methods'></A>com.wis.math.calc.solvers.Verlet Methods:</P>
			<div class='methodsDiv' >


				<P class='methodTitle'><A name=' initialize'></A><u>  initialize</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Initializes the IODE solver. Two temporary state arrays and
     one rate array are allocated. The number of differential
     equations is determined by invoking getState().length on the
     IODE.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.initialize(_stepSize);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  _stepSize  (Number) -- step integer.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' step'></A><u>  step</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Steps (advances) the differential equations by the stepSize.
     The IODESolver invokes the IODE's getRate method to obtain the
     initial state of the system. The IODESolver then advances the
     solution and copies the new state into the state array at the
     end of the solution step.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.step();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns step size.
    </P>

				<P class='methodTitle'><A name=' setStepSize'></A><u>  setStepSize</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Sets the step size. The step size remains fixed in this
     algorithm. The prior state array is reinitialized.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.setStepSize(_stepSize);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  _stepSize  (Number) -- step integer.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' getStepSize'></A><u>  getStepSize</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets the step size. The stepsize is constant in this algorithm.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getStepSize();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns step size.
    </P>

				<P class='methodTitle'><A name=' setTolerance'></A><u>  setTolerance</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Abstract interface method.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>not used.</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  _tol  (Number) -- .</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' getTolerance'></A><u>  getTolerance</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Abstract interface method.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>not used.</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)
    </P>

				<P class='methodTitle'><A name=' estimatePreviousState'></A><u>  estimatePreviousState</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Estimate's the previous state. The Verlet method is not
     self-starting.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.estimatePreviousState(state);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  state  (Array) -- state array.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>
</div>

			<BR>
			<BR>
			<HR class='big'>
			<span class="footer">generated with <A href='http://blog.klaustrofobik.org/' target='_blank'>AS2docGenerator beta 0.5.3</A></span>
			</BODY>
			</HTML>

